import request from '@/utils/request'

// 查询保险主列表
export function listInsureManage(query) {
    return request({
        url: '/insurance/insureManage/list',
        method: 'get',
        params: query
    })
}

// 查询保险主详细
export function getInsureManage(id) {
    return request({
        url: '/insurance/insureManage/' + id,
        method: 'get'
    })
}

// 新增保险主
export function addInsureManage(data) {
    return request({
        url: '/insurance/insureManage',
        method: 'post',
        data: data
    })
}

// 修改保险主
export function updateInsureManage(data) {
    return request({
        url: '/insurance/insureManage',
        method: 'put',
        data: data
    })
}

// 删除保险主
export function delInsureManage(id) {
    return request({
        url: '/insurance/insureManage/' + id,
        method: 'delete'
    })
}

// 查询保险主列表
export function listMain(query) {
    return request({
        url: '/insurance/main/list',
        method: 'get',
        params: query
    })
}
// 查询保险主列表
export function getMainList(query) {
    return request({
        url: '/insurance/main/getMainList',
        method: 'get',
        params: query
    })
}

// 查询保险主详细
export function getMain(id) {
    return request({
        url: '/insurance/main/' + id,
        method: 'get'
    })
}

// 新增保险主
export function addMain(data) {
    return request({
        url: '/insurance/main',
        method: 'post',
        headers: {
            isRepeatSubmit: true,
        },
        loading: true,
        data: data
    })
}

// 修改保险主
export function updateMain(data) {
    return request({
        url: '/insurance/main',
        method: 'put',
        headers: {
            isRepeatSubmit: true,
        },
        loading: true,
        data: data
    })
}

// 删除保险主
export function delMain(id) {
    return request({
        url: '/insurance/main/' + id,
        method: 'delete'
    })
}
